@page "/calendarSetting"
@namespace SwashbucklerDiary.Rcl.Pages
@inherits ImportantComponentBase

<MyAppBar Title="@(I18n.T("Calendar"))"
          OnClick="NavigateToBack">
</MyAppBar>

<ScrollContainer>
    <MCard Class="my-list-card"
           Elevation="0"
           Rounded="@("lg")">
        <MList>
            <MListItem OnClick="() => showFirstDayOfWeek = true">
                <MListItemIcon>
                    <MIcon Class="evident-icon">
                        mdi:mdi-calendar-week-begin-outline
                    </MIcon>
                </MListItemIcon>
                <MListItemContent>
                    @(I18n.T("First day of week"))
                </MListItemContent>
                <MListItemContent Class="setting-item-state">
                    <MListItemSubtitle>
                        @FirstDayOfWeekText
                    </MListItemSubtitle>
                </MListItemContent>
                <MListItemAction>
                    <MIcon>chevron_right</MIcon>
                </MListItemAction>
            </MListItem>
        </MList>
    </MCard>
</ScrollContainer>

<SelectChipDialog @bind-Visible="showFirstDayOfWeek"
                  @bind-Value="@firstDayOfWeek"
                  @bind-Value:after="UpdateSetting"
                  Title="@(I18n.T("First day of week"))"
                  Items="firstDayOfWeekItems"
                  Mandatory="true">
</SelectChipDialog>
